<template>
  <div class="search-main">
    <el-dialog
      title="Search"
      :visible.sync="dialogVisible"
      width="55%"
      :before-close="handleClose"
    >
      <!-- 关键字 -->
      <div class="keyword">
        <el-input v-model="keyword" placeholder="输入关键字...."></el-input>
      </div>
      <!-- 查询列表 -->
      <div class="serach-list"></div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  components: {},
  name: "search",
  props: ['dialogVisible'],
  data() {
    return {
      keyword: "",
    };
  },
  created() {},
  // 创建一个过滤器
  filters: {},
  methods: {
    handleClose(done) {
      this.$confirm("确认关闭？")
        .then((_) => {
          // 将数据传输给父亲
          this.$emit('closeDialog')
        })
        .catch((_) => {});
    },
  },
};
</script>

<style>
.search-main {
  margin: 80px auto;
}
.el-dialog__title {
  margin-left: 45% !important;
}

.el-dialog__header {
  border-bottom: 1px solid #c7c3bd;
}
</style>
